/*! \file IrDecoderManager.h Holds the functionality for the IrDecoderManger. */
#ifndef __IR_DECODER_MANAGER_H_INCLUDED__
#define __IR_DECODER_MANAGER_H_INCLUDED__

#include <boost/shared_ptr.hpp>
#include "IIrDecoder.h"
#include "ILogger.h"
#include <list>

/*! The IR Decoder manager is responsible for keeping track of all the IR decoders and feeding them with data and resetting them if a match was found. */
class IrDecoderManager {
protected:
	typedef std::list<IIrDecoderPtr> DecoderList;
	DecoderList m_Decoders;
	void resetAll();
	ILoggerPtr m_Logger;
public:
	IrDecoderManager( ILoggerPtr logger );
	void add ( IIrDecoderPtr decoder );
	void add ( IIrDecoder * decoder );
	/*! Process a piece of IR data from the driver, not necessarily the full code. */
	void process ( unsigned long * data, size_t count );
};
typedef boost::shared_ptr<IrDecoderManager> IrDecoderManagerPtr;

#endif